package com.aliyun.heiyu.powermaster.server.rotary.dao.impl;

import com.aliyun.heiyu.powermaster.server.rotary.dao.CfdDAO;
import com.aliyun.heiyu.powermaster.server.rotary.object.entity.DataCfdEntity;
import com.aliyun.heiyu.powermaster.server.rotary.utils.JdbcUtil;

/**
 * @Description cfd数据实现类
 * @Author shun.zhang
 * @Date 2020/11/30 16:48
 **/
public class CfdDAOImpl implements CfdDAO {
    /**
     * 获取最新的cfd数据fd
     *
     * @return
     */
    @Override
    public DataCfdEntity selectCfdNew() {
        String sql = "SELECT id, cfd_ac_temp_range, cfd_data_rate, cfd_data_size, cfd_per, cfd_ser_power_range, raw_ac_temp_range, raw_data_rate, raw_data_size, raw_per, raw_ser_power_range\n" +
            "FROM state_grid.data_cfd order by id limit 1";
        return JdbcUtil.queryForBean(sql,null,DataCfdEntity.class);
    }
}
